/* Hybrid System Abstractor
 *
 * Copyright (c) 2013, Fortiss GmbH - An-Institut TU Muenchen
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.fortiss.automaton;

import java.util.*;
import javax.xml.bind.annotation.*;



@XmlSeeAlso({HybridNode.class, KripkeNode.class})
public class Node
{
    @XmlAttribute
    protected int id;
    protected String name;
    private boolean initial;
    
    @XmlElement
    protected Set<Edge> edge;
    
    public void init(int id, String name, boolean init)
    {
        this.id = id;
        this.name = name;
        this.initial = init;
        this.edge = new HashSet<Edge>();
    }
    
    public int getID()          { return id;    }
    
    @XmlAttribute
    public void setName(String n)   { this.name = n; }
    public String getName()         {return this.name;}
    
    @XmlAttribute
    public void setInitial(boolean b)   { this.initial = b; }
    public boolean isInitial()          { return initial; }
    
    public void addEdge(Edge e)
    {
        edge.add(e);
    }
    public Set<? extends Edge> getEdge()
    {
        return edge;
    }
}